#include <iostream>
#include <string>
using namespace std;
int main() {
    string a;
    getline(cin, a);
    if (a[a.length() - 1] != ' ') {
        a += ' ';
    }
    string b, c, d, e, num;
    int i = 0;
    if (a.length() == i + 1) {
        cout << "Wrong input" << endl;
    } else {
        while (b != " ") {
            b = a[i];
            c += a[i];
            i++;
        }
        b = "";
        if (a.length() == i) {
            cout << "Wrong input" << endl;
        } else {
            while (b != " ") {
                b = a[i];
                d += a[i];
                i++;
            }
            b = "";
            if (a.length() == i) {
                cout << "Wrong input" << endl;
            } else {
                while (b != " ") {
                    b = a[i];
                    e += a[i];
                    i++;
                }
                if (c == "zero ") {
                    num += "0";
                }
                if (c == "one ") {
                    num += "1";
                }
                if (c == "two ") {
                    num += "2";
                }
                if (c == "three ") {
                    num += "3";
                }
                if (c == "four ") {
                    num += "4";
                }
                if (c == "five ") {
                    num += "5";
                }
                if (c == "six ") {
                    num += "6";
                }
                if (c == "seven ") {
                    num += "7";
                }
                if (c == "eight ") {
                    num += "8";
                }
                if (c == "nine ") {
                    num += "9";
                }
                if (d == "zero ") {
                    num += "0";
                }
                if (d == "one ") {
                    num += "1";
                }
                if (d == "two ") {
                    num += "2";
                }
                if (d == "three ") {
                    num += "3";
                }
                if (d == "four ") {
                    num += "4";
                }
                if (d == "five ") {
                    num += "5";
                }
                if (d == "six ") {
                    num += "6";
                }
                if (d == "seven ") {
                    num += "7";
                }
                if (d == "eight ") {
                    num += "8";
                }
                if (d == "nine ") {
                    num += "9";
                }
                if (e == "zero ") {
                    num += "0";
                }
                if (e == "one ") {
                    num += "1";
                }
                if (e == "two ") {
                    num += "2";
                }
                if (e == "three ") {
                    num += "3";
                }
                if (e == "four ") {
                    num += "4";
                }
                if (e == "five ") {
                    num += "5";
                }
                if (e == "six ") {
                    num += "6";
                }
                if (e == "seven ") {
                    num += "7";
                }
                if (e == "eight ") {
                    num += "8";
                }
                if (e == "nine ") {
                    num += "9";
                }
                if (num.length() < 3) {
                    cout << "Wrong input" << endl;
                } else {
                    cout << num << endl;
                }
            }
        }
    }
    return 0;
}